package com.function;

import java.util.function.Consumer;

/**
 * @Author: 许磊磊
 * @Date: 2022/10/17 16:22
 * @Version 1.0
 */
public class ConsumerTest {
    public static void main(String[] args) {
//        Consumer<String> consumer = new Consumer<String>() {
//            @Override
//            public void accept(String s) {
//                System.err.println(s);
//            }
//        };
//        consumer.accept("nihao");
//    }

//        Consumer<String> consumer = s -> System.err.println(s);
//        consumer.accept("aaa");
//
        ConsumerDemo demo = new ConsumerDemo();
//        demo.TestConsumer(s->System.err.println(s),"nihao");

        demo.TestConsumer(System.err::println,"haha");

    }
}
